#http://www.meituba.com/tag/tuinvlang.html
#http://www.meituba.com/tag/tuinvlang/2.html
#http://www.meituba.com/tag/tuinvlang/3.html
import re
import urllib.request as r
test=[]
for i in range(2,10):
    html = 'http://www.meituba.com/tag/tuinvlang/%d.html' % i
    test.append(html)
x=1
for o in test:
    url=r.urlopen(o).read().decode('utf-8')
    yy=re.compile(r'src="(.+?\.jpg)"')
    tayp=yy.findall(url)
    print('第一次循环为:',tayp)
    for u in tayp:
        print('二次循环为:',u)
        r.urlretrieve(u,'F:/美女/%s.jpg' % x)
        print('爬取中当前是第%s张'%x)
        x+=1






